package com.weilx959.spt.plugin.e2sp.model;

import com.weilx959.spt.plugin.e2sp.constant.ExcelType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 * excel vo
 *
 * @author weilx
 * @since 2024-04-29
 */
@Data
@SuperBuilder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class ExcelVO {
    /**
     * 文件名
     */
    private String name;

    /**
     * 类型
     */
    private ExcelType type;

    private String path;

    private List<SheetVO> sheets;

    @Data
    @SuperBuilder
    @Accessors(chain = true)
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SheetVO {
        private String name;

        private int index;

        private List<RowVO> rows;
    }

    @Data
    @SuperBuilder
    @Accessors(chain = true)
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RowVO {
        private int index;

        private List<Object> cells;
    }
}
